<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>创业者服务首页</title>
		<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css"/>
		<link rel="stylesheet" href="../css/leftSidebar.css">
	</head>
	<style type="text/css">
        html,body{height: 100%;}
		.col-xs-12.nav_right{padding: 0;height: 100px;padding-right: 0;margin-right: 0;min-width: 1300px;height: 100px;padding-right: 0;margin-right: 0;padding-left: 160px;}
		#myTab a{color: #7c7c7c; font-size: 15px;}
		#myTab>li.active>a{color: #3f4142; background-color: #fff;}
		.navbar-form{margin-top: 0;}
		.tab_creat .active{color:#6bc50d;}
		.table>tbody>tr.active>td, .table>tbody>tr.active>th, .table>tbody>tr>td.active, .table>tbody>tr>th.active, .table>tfoot>tr.active>td, .table>tfoot>tr.active>th, .table>tfoot>tr>td.active, .table>tfoot>tr>th.active, .table>thead>tr.active>td, .table>thead>tr.active>th, .table>thead>tr>td.active, .table>thead>tr>th.active{background-color: #fff;}
		.table>tfoot>tr.active>td{background-color: #fff;}
		.table>tbody>tr>td{border-top:0;}
		.table{margin-bottom: 0;}
		div.tab_creat.row{background-color: #fff;}
		.tab_font{padding: 10px 0;}
		.tab_font div,.tab_font td{font-size: 14px;color: #919191;}
		.gongsi_list div.col-xs-2,.gongsi_list div.col-xs-1,.gongsi_list div.col-xs-4{text-align: center;padding: 20px 0;}
		.gongsi_list.row{background-color: #fff;margin-top: 20px;}
		.gongsi_list dd div.col-xs-2{font-size: 14px;color: #4f5051;}
		.row{margin: 0;}
		.sub_logo{position: relative;display: inline-block;padding-left: 0;}
		.sub_logo input{opacity: 0;position: absolute;left: 0;right: 0;bottom: 0;top: 0;}
		.zhube_head{border-bottom: 1px solid #ddd;}
		.zhube_head h3{padding: 5px 0;, color: #222c38;font-size: 16px;border-bottom: 4px solid #5a626d;}
			
		#form_test label{font-size: 14px; color: #515151;font-weight: normal;}
		#form_test  .media-middle{font-size: 14px;color: #acacac;}
		.form_tip{font-size: 12px;color: #acacac; }
		.btn-default{border-color: #d5272d;color: #d5272d;}
		.btn-default.disabled{background-color: #ccc;color: #fff;border-color:#ccc;}
		.btn-default.disabled.focus, .btn-default.disabled:focus, .btn-default.disabled:hover, .btn-default[disabled].focus, .btn-default[disabled]:focus, .btn-default[disabled]:hover, fieldset[disabled] .btn-default.focus, fieldset[disabled] .btn-default:focus, fieldset[disabled] .btn-default:hover{background-color: #ccc;color: #fff;}
		.label.label-success{color: #d5272d ;background-color: #ffe6e7;font-weight: normal;}
		.media-body p{padding: 20px 0;}
		.xq_bg{background-color: #fff;padding: 20px 0;}
		
		/*详情界面*/
		 #navbar-example{border: 0;background-color: #fff;}
		 #navbar-example .nav-pills>li.active>a{border-bottom: 4px solid #d5272d ; background-color: #fff;border-radius: 0;color: #222c38;}
		 #navbar-example .nav-pills>li>a{font-size: 22px;color: #5a626d;}
		 .progress_jieshao h4{font-size: 22px;border-left: 4px solid #222c38;padding: 0 10px;margin-top: 20px;}
		 .progress_jieshao p{font-size: 18px;color: #5a626d;line-height: 30px;padding:0 10px;}
		 .progress_jieshao section{font-size: 18px;color: #5a626d;padding: 0 10px;}
		 .panel_name{font-size: 16px; color: #969fa8;padding: 0 10px;}
		 .panne_exp ul>li{margin: 20px 0;}
		 .panne_exp ul>li:last-child{margin-top: 10px;}
		 .panel-title{font-size: 24px;color: #222c38;font-weight: bold;}

		.backBtn{position: absolute;bottom: 150px;left: 30px}
		.backBtn a{width: 80px;background-color: #0a628f;color: #ccc;border-color:#0a628f; }
	</style>
	<body style="background-color: #f2f2f2;">
		<div class="row warp" style="height: 100%;">
			<div class="nav_right_head">
				<a href="../index.html"><img src="../img/roleIndexBg.jpg"></a>
			</div>
			<!--左侧导航-->
			<div class="col-xs-2 nav_left">
				<div class="creatNav">创业者服务</div>
				<div class="creatLoginStatus"><img src="../img/avtar.png"><a>您好，创业者</a></div>
				<div class="list-group" style="padding: 0;">
					<a href="cyzfw_index.html" class="list-group-item "><i class="glyphicon glyphicon-home"></i> 首页</a>
					<a href="cyzfw_zuche.html" class="list-group-item active"><i class="glyphicon glyphicon-plus-sign"></i> 注册项目</a>
					<a href="cyzfw_myProgress.html" class="list-group-item"><i class="glyphicon glyphicon-folder-open"></i> 我的项目</a>
					<a href="cyzfw_mynews.html" class="list-group-item"><i class="glyphicon glyphicon-book"></i> 我的消息</a>
					<div class="list-group listAttention">
						<div class="list-group-item" > <span class="caret"></span> 我的关注</div>
						<a href="cyzfw_gz_touziren.html" class="list-group-item"><i class="glyphicon glyphicon-usd"></i> 投资人/机构</a>
						<a href="cyzfw_gz_daoshi.html" class="list-group-item"><i class="glyphicon glyphicon-user"></i> 导师</a>
						<a href="cyzfw_gz_xiangmu.html" class="list-group-item"><i class="glyphicon glyphicon-lock"></i> 项目</a>
					</div>

				</div>
				<div class="backBtn"> <a href="../index.html"><img src="../img/backIndex.png"></a></div>
			</div>
			
			<div class="col-xs-12 nav_right">


			<div class="row">
				<div class="xq_bg" style="">

					<div class="row">
						<div class="col-xs-6 col-xs-offset-1">
							<div class="media">
								<div class="media-left">
									<a href="#">
										<img class="media-object toturLogo" src="../img/020.jpg" onerror="onErrorHandle(this)" style="width: 140px;height: 140px;" >
									</a>
								</div>
								<div class="media-body investIntroduce">
									<h4 class="media-heading" style="padding-top: 20px;">导师昵称 <small>导师学历</small></h4>
									<p></p>
								</div>
							</div>
						</div>
						<div class="col-xs-2 col-xs-offset-2" style="padding-right: 0;">
							<div class="panel panel-default">
								<div class="panel-heading text-center">单笔投资金额</div>
								<div class="text-center row" style="padding: 10px;">
									<div class="col-xs-6 col-xs-offset-3">￥2000万</div>
								</div>
							</div>
						</div>

					</div>
				</div>
			</div>

			<nav id="navbar-example" class="navbar navbar-default navbar-static" role="navigation">
				<div class="row">
					<div class="bs-js-navbar-scrollspy col-xs-10 col-xs-offset-1">
						<ul class="nav nav-pills navbar-left">
							<li class="active"><a href="#introduce">投资偏好</a></li>
							<li><a href="#experience">投资案例</a></li>
						</ul>
						<div class="navbar-right" style="margin-right: 50px;">
							<button class="btn btn-default attentionInvest">关注</button>
						</div>

					</div>

				</div>

			</nav>

			<div class="col-xs-10 col-xs-offset-1">
				<div data-spy="scroll" data-target="#navbar-example" data-offset="0"  style=" position: relative;">
					<div class="panel panel-default progress_jieshao">
						<div class="panel-heading">
							<h3 class="panel-title" id="introduce">投资者/机构信息</h3>
						</div>
						<div class="panel-body">
							<ul class="list-unstyled" id="investDetailList">
								<li>
									<h4>研究领域</h4>
									<div class="panel_name"><span>无人机、物联网</span></div>
								</li>
							</ul>
						</div>
					</div>



					<!--我的项目-->
					<div class="panel panel-default">
						<div class="panel-heading">
							<h3 class="panel-title " id="experience">投资案例</h3>
						</div>
						<div class="panel-body" style="padding: 0;">
							<div class="row gongsi_list">
								<dl style="background-color: #fff;">
									<dt>
									<div class="row">
										<div class="col-xs-4" style="text-align: left;padding-left: 15px;">创业公司</div>
										<div class="col-xs-2">融资阶段</div>
										<div class="col-xs-2">创业领域</div>
										<div class="col-xs-1">导师</div>
										<div class="col-xs-2">过往投资方</div>
										<div class="col-xs-1">操作</div>

									</div>
									</dt>
									<dd>
										<div class="row">
											<div class="col-xs-4" style="padding-top: 10px;">
												<div class="media">
													<div class="media-left media-middle" style="padding: 0px 15px;">
														<img src="../img/carous.png" style="width: 40px;height: 40px;"/>
													</div>
													<div class="media-body text-left">
														<span style="display: inline-block;margin-top: 10px;">小橙科技</span>

													</div>
												</div>
											</div>

											<div class="col-xs-2">201703024</div>
											<div class="col-xs-2">生活消费</div>
											<div class="col-xs-1">王西军</div>
											<div class="col-xs-2">无</div>
											<div class="col-xs-1">关注</div>


										</div>

									</dd>
									<dd>
										<div class="row">
											<div class="col-xs-4" style="padding-top: 10px;">
												<div class="media">
													<div class="media-left media-middle" style="padding: 0px 15px;">
														<img src="../img/carous.png" style="width: 40px;height: 40px;"/>
													</div>
													<div class="media-body text-left">
														<span style="display: inline-block;margin-top: 10px;">小橙科技</span>

													</div>
												</div>
											</div>

											<div class="col-xs-2">201703024</div>
											<div class="col-xs-2">生活消费</div>
											<div class="col-xs-1">王西军</div>
											<div class="col-xs-2">无</div>
											<div class="col-xs-1">关注</div>


										</div>

									</dd>
									<dd>
										<div class="row">
											<div class="col-xs-4" style="padding-top: 10px;">
												<div class="media">
													<div class="media-left media-middle" style="padding: 0px 15px;">
														<img src="../img/carous.png" style="width: 40px;height: 40px;"/>
													</div>
													<div class="media-body text-left">
														<span style="display: inline-block;margin-top: 10px;">小橙科技</span>

													</div>
												</div>
											</div>

											<div class="col-xs-2">201703024</div>
											<div class="col-xs-2">生活消费</div>
											<div class="col-xs-1">王西军</div>
											<div class="col-xs-2">无</div>
											<div class="col-xs-1">关注</div>


										</div>

									</dd>
								</dl>

							</div>
						</div>
					</div>


				</div>

			</div>

		</div>
		</div>
	</body>
	<script src="../js/jquery-2.1.1.min.js"></script>
	<script type="text/javascript" src="../js/bootstrap.min.js" ></script>
	<script type="text/javascript" src="../js/public.js"></script>
	<script type="text/javascript">
		var person = JSON.parse(sessionStorage.getItem("person"));
		if (person==''||person==null) {
			alert('请先登录')
			window.location.href='denglu.html';
		} else{
			var userId = person.userid;
		}





		console.log(userId);
		var id = location.href.split('?')[1];
		console.log(id);

		$.ajax({
			type: "get",
			url:"http://114.112.96.184:18080/view/invest/"+id,
			data:{'userId':userId},
			error: function(request) {
				console.log("Connection error");
			},
			success: function(data) {
				console.log(data);
				var obj = data.result;
				$('.toturLogo').attr('src',obj.logo);
				var tutorName =obj.realName;
				$('.media-body h4').html(tutorName);
				var tutorTel = obj.institution;
				$('.media-body.investIntroduce p').html(tutorTel);

				var field = obj.investField.split(',');
				var fieldHtlm = '';
				for(i=0;i<field.length;i++){
					fieldHtlm+=  '<span class="label label-success">'+ field[i]+'</span>'
				}
				$('.media-body.investIntroduce').append(fieldHtlm);

				var attention='';
				if (obj.attention==true) {
					attention='取消关注'
				} else{
					attention='关注'
				}
				$('.attentionInvest').text(attention);
				var investDetailContent='';
				investDetailContent= '<li><h4>投资领域</h4>'+
						'<p>'+obj.investField+'</p>'+
						'</li>'+
						'<li><h4>偏好轮次</h4>'+
						'<p>'+obj.preference+ '</p>'+
						'</li>'+
						'<li><h4>地区</h4>'+
						'<section>'+obj.area+ '</section>'+
						'</li>';


				$('#investDetailList').html(investDetailContent)
			}
		});



		function onErrorHandle(obj){
			obj.src="../img/defaultAvatar.png";
		}

		$(document).on('click','.attentionInvest',function () {
			if (person==''||person==null) {
				window.location.href='denglu.html';
				return;
			}
			if ($(this).text()=='我'){
				return false;
			}
			var id = $(this).attr('attentionId');

			if($(this).text()=='关注'){
				$(this).text('取消关注')
			}else {
				$(this).text('关注')
			}
			attentionInvest();
			function attentionInvest() {
				$.ajax({
					type: "post",
					data:{'userId':userId},
					url:"http://114.112.96.184:18080/auth/attentionInvest/"+id,
					async: false,
					error: function(request) {
						console.log("Connection error");
					},
					success: function(data) {
						console.log(data);

					}
				});
			}

		});



	</script>
</html>
